<?php $this->load->view('common/header');?>
<body class="padding_bottom">
<!-- user_head [[-->
<div class="user_head">
	<div class="head_info">
    	<span class="img">
            <?php if(file_exists(FCPATH.'uploads/avatar/'.$user['user_id'].'/'.$user['user_id'].'_avatar_big.jpg')){?>
                <img src="<?php echo base_url('uploads/avatar/'.$user['user_id'].'/'.$user['user_id'].'_avatar_big.jpg?t='.time());?>">
            <?php }else{ ?>
                <img src="<?php if($user['big_avatar'])echo $user['big_avatar'] ?>">
            <?php } ?>
        </span>
        <p class="name">
            <?php if($user['user_uname']){ echo $user['user_uname'];} else{ echo $user['user_name'];}?>
            <?php if($user_info['user_card_rz'] == 2){ ?>
                <i class="ico"></i>
            <?php }?>
        </p>
    </div>
</div>
<!--]] user_head -->
<!-- user_menu [[-->
<div class="user_menu">
	<ul>
    	<li>
        	<a href="<?php echo site_url('order/records')?>">
<!--            	<span class="data">2</span>-->
            	<i class="ico ico_a"></i>订单管理
            </a>
        </li>
    </ul>
</div>
<div class="user_menu">
	<ul>
    	<li>
        	<a id="xsd" href="javascript:;" val="<?php echo site_url('member/user_loan')?>">
                <?php if($user_info['user_card_rz'] < 2){ ?>
            	    <span class="rz">完成实名认证，开通销售贷</span>
                <?php }else{ ?>
                    <span class="rz">点击查看我的销售贷</span>
                <?php } ?>
            	<i class="ico ico_b"></i>销售贷
            </a>
        </li>
    </ul>
</div>
<div class="user_menu">
	<ul>
        <li>
            <a href="<?php echo site_url('member/invite')?>">
                <b class="ico"></b>
                <i class="ico ico_c"></i>邀请好友
            </a>
        </li>
    	<li>
        	<a href="<?php echo site_url('user/products')?>">
            	<b class="ico"></b>
            	<i class="ico ico_c"></i>产品管理
            </a>
        </li>
        <li>
        	<a href="<?php echo site_url('member/site/'.$user['user_id'])?>">
            	<b class="ico"></b>
            	<i class="ico ico_d"></i>个人资料
            </a>
        </li>
        <li>
        	<a href="<?php echo site_url('member/verified')?>">
            	<b class="ico"></b>
            	<span class="rz"><?php if($user_info['user_card_rz']==1){ ?>申请中<?php }else if($user_info['user_card_rz'] == 2){ ?>已认证<?php }else{?>点击认证<?php } ?></span>
            	<i class="ico ico_e"></i>实名认证
            </a>
        </li>
    </ul>
</div>
<div class="user_menu">
	<ul>
    	<li>
        	<a href="<?php echo site_url('user/logout')?>">
            	<i class="ico ico_f"></i>退出登录
            </a>
        </li>
    </ul>
</div>
<!--]] user_menu -->
<!-- foot_menu [[ -->
<?php $this->load->view('common/footer');?>
<script>
    var xsd = "<?php echo $user_info['user_card_rz'];?>";
    // 提交
    $("#xsd").on("click",function(){
        if(xsd < 1){
            layer.msg('请先进行实名认证哦！');
            return false;
        }else if(xsd < 2){
            layer.msg('请等待实名认证通过哦！');
            return false;
        }else{
            var url = $(this).attr("val");
            window.location.href = url;
        }

    });
</script>
<!--]] foot_menu -->
</body>
</html>
